package work.mediway.mdm.core.entity;

import java.util.List;

import javax.validation.constraints.NotBlank;

import cn.hutool.core.collection.CollUtil;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

/**
 * 表信息
 *
 * @author zhongyj <1126834403@qq.com><br/>
 * @date 2022/6/17
 */
@ApiModel("table")
@Data
public class Table {

    /**
     * 表名
     */
    @NotBlank(message = "不能为空")
    @ApiModelProperty(value = "表名", required = true)
    private String tableName;
    /**
     * 表注释
     */
    @NotBlank(message = "不能为空")
    @ApiModelProperty(value = "表注释", required = true)
    private String comment;
    /**
     * 表类型id
     */
    @ApiModelProperty(value = "表类型id", required = true)
    private Long typeId;

    private List<Column> columns = CollUtil.newArrayList();

}
